package com.framework.common.message;

import com.framework.common.utils.QuickHelper;
import org.omg.CORBA.OBJ_ADAPTER;

import java.util.Map;

public class MessagePacketData {

    private Integer code;

    /**
     * 消息类型 text(默认) , images , voice
     */
    private MessageType type;
    private Object content;
    private Integer from;
    private Integer to;
    private String mode;
    private User user;
    private Integer adddate = 0;
    private Map<String,Object> ext;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public MessageType getType() {
        return type;
    }

    public void setType(MessageType type) {
        this.type = type;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public Integer getAdddate() {
        return adddate;
    }

    public void setAdddate(Integer adddate) {
        this.adddate = adddate;
    }

    public Map<String, Object> getExt() {
        return ext;
    }

    public void setExt(Map<String, Object> ext) {
        this.ext = ext;
    }

    public MessagePacketData() {
        this.type = MessageType.TEXT;
        this.code = 1;
        this.mode = "none";
        this.adddate = QuickHelper.getNowTimeStampSeconds();
    }
}
